/*
 * @Author: huyu
 * @Date: 2020-06-06 11:35:46
 * @Last Modified by: huyu
 * @Last Modified time: 2020-06-18 16:21:03
 */

// 头部组件

import React, { Component } from "react"
import Nav from "./Nav"
import style from "./Header.module.less"
import Logo from "../../resource/images/nuobel.png"

export default class Header extends Component {
  constructor(props) {
    super(props)
    this.state = {}
  }
  render() {
    const { title, showNav, showHeaderShadow } = this.props
    return (
      <header
        className={
          showHeaderShadow ? `${style.main} ${style.mainShadow}` : style.main
        }
      >
        <a className={style.logo} href="/">
          <img src={Logo} alt="nuobel logo" />
        </a>
        {showNav && <Nav />}
        {title && <h1 className={style.title}>{title}</h1>}
      </header>
    )
  }
}
